﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="quan_tri_trang_nhom.ascx.cs" Inherits="quan_tri_trang_nhom" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<telerik:RadAjaxManager OnAjaxRequest="Ajax_Request" ID="RadAjaxManager1" runat="server" 
    DefaultLoadingPanelID="RadAjaxLoadingPanel1">
    <AjaxSettings>
       <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="grdCategoryPage" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="grdFunctionPage">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadWindowManager1" />
                <telerik:AjaxUpdatedControl ControlID="grdCategoryPage" />
                <telerik:AjaxUpdatedControl ControlID="lblMessage" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">
</telerik:RadAjaxLoadingPanel>

<telerik:RadScriptBlock runat="server" ID="script1">
    <script type="text/javascript" language="javascript">
        function Window_Close() {
            $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
        }
    </script>
</telerik:RadScriptBlock>

<telerik:RadWindowManager  ID="RadWindowManager1" runat="server" >
    <Windows>
        <telerik:RadWindow OnClientClose="Window_Close" VisibleStatusbar="false" Modal="true" Width="800px" Height="600px" runat="server" ID="windows1"></telerik:RadWindow>
    </Windows>
</telerik:RadWindowManager>

<asp:Label runat="server" ID="lblMessage"></asp:Label>
<fieldset>
    <legend><span class="title" style="color:Blue" >QUẢN TRỊ TRANG NHÓM</span></legend>

<div style="width:100%; ">
    <table width="100%">
        <tr>
            <td style="width:80%"> </td>
            <td align="right"><a href="/Admin/Form/CategoryPage_Add.aspx" ><img src="/Image/add2.png" alt="Thêm mới trang nhóm" title="Thêm mới trang nhóm" />Thêm Mới</a></td>
        </tr>
    </table>
</div>


<telerik:RadGrid AllowFilteringByColumn="True" Skin="WebBlue" GridLines="Horizontal"  OnDeleteCommand="CategoryPage_Delete" AllowPaging="true" PageSize="10" OnPageIndexChanged="grd_PageIndexChanged"  AllowSorting=true ID="grdCategoryPage" AutoGenerateColumns="false"  runat="server">
    <MasterTableView>
        <Columns>
            <telerik:GridBoundColumn HeaderText="ID" Display="false" DataField="CategoryPageID"></telerik:GridBoundColumn>
           <telerik:GridTemplateColumn AutoPostBackOnFilter="true" AllowFiltering="true" HeaderText="Tên Trang" DataField="CategoryPageName">                
                <ItemTemplate>
                    <a href="/Admin/Form/CategoryPage_Add.aspx?id=<%#DataBinder.Eval(Container.DataItem,"FunctionPageID")%>">
                    <%# Eval("FunctionPageName")%></a>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            
            <telerik:GridBoundColumn DataField="ParentPageName" HeaderText="Nhóm Cha" AllowSorting="true" AllowFiltering="true">
            </telerik:GridBoundColumn>
            
            <telerik:GridBoundColumn Visible="false" DataField="FuntionPageTitle" HeaderText="Tiêu Đề Trang" AllowFiltering="true">
            </telerik:GridBoundColumn>
            
            <telerik:GridImageColumn AllowFiltering="false" ImageHeight="80px" ImageWidth="100px" DataImageUrlFields="FuntionPageImage" UniqueName="FuntionPageImage" HeaderText="Ảnh Đại Diện" >
            </telerik:GridImageColumn>

            <telerik:GridCheckBoxColumn DataField="IsVisible" UniqueName="IsVisible" HeaderText="Hiển Thị" AllowFiltering="true">
            </telerik:GridCheckBoxColumn>
            
            <telerik:GridCheckBoxColumn DataField="AllowDelete" UniqueName="AllowDelete" HeaderText="Cho Phép Xóa" AllowFiltering="true">
            </telerik:GridCheckBoxColumn>
            
            <telerik:GridBoundColumn DataField="ViewOrder" ItemStyle-Width="20" UniqueName="ViewOrder" HeaderText="Thứ Tự" AllowFiltering="true">
            </telerik:GridBoundColumn>
            
            <telerik:GridBoundColumn DataField="Lang" UniqueName="Lang" HeaderText="Ngôn Ngữ" AllowFiltering="true">
            </telerik:GridBoundColumn>
            
            <telerik:GridCheckBoxColumn DataField="IsAdmin" UniqueName="IsAdmin" HeaderText="Hệ Thống" AllowFiltering="true">
            </telerik:GridCheckBoxColumn>
            
            <telerik:GridBoundColumn DataField="FunctionType" UniqueName="FunctionType" HeaderText="Kiểu Trang" AllowFiltering="true">
            </telerik:GridBoundColumn>
            
            <telerik:GridButtonColumn CommandName="Delete" UniqueName="DeleteColumn" ButtonType="ImageButton" ConfirmText="Bạn có chắc chắn muốn xóa trang nhóm?"  ImageUrl="/Image/delete.png"></telerik:GridButtonColumn>
        </Columns>
    </MasterTableView>
</telerik:RadGrid>
</fieldset>
